3.79 \(\int \frac {(e x)^{-1+n}}{a+b \csc (c+d x^n)} \, dx\)

Optimal. Leaf size=85 \[ \frac {2 b x^{-n} (e x)^n \tanh ^{-1}\left (\frac {a+b \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )}{a d e n \sqrt {a^2-b^2}}+\frac {(e x)^n}{a e n} \]

[Out]

(e*x)^n/a/e/n+2*b*(e*x)^n*arctanh((a+b*tan(1/2*c+1/2*d*x^n))/(a^2-b^2)^(1/2))/a/d/e/n/(x^n)/(a^2-b^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4209, 4205, 3783, 2660, 618, 206} \[ \frac {2 b x^{-n} (e x)^n \tanh ^{-1}\left (\frac {a+b \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )}{a d e n \sqrt {a^2-b^2}}+\frac {(e x)^n}{a e n} \]

Antiderivative was successfully verified.

[In]

Int[(e*x)^(-1 + n)/(a + b*Csc[c + d*x^n]),x]

[Out]

(e*x)^n/(a*e*n) + (2*b*(e*x)^n*ArcTanh[(a + b*Tan[(c + d*x^n)/2])/Sqrt[a^2 - b^2]])/(a*Sqrt[a^2 - b^2]*d*e*n*x
^n)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

Rule 3783

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(-1), x_Symbol] :> Simp[x/a, x] - Dist[1/a, Int[1/(1 + (a*Sin[c + d
*x])/b), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]

Rule 4205

Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Csc[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rule 4209

Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*((e_)*(x_))^(m_.), x_Symbol] :> Dist[(e^IntPart[m]*(e*x
)^FracPart[m])/x^FracPart[m], Int[x^m*(a + b*Csc[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]

Rubi steps

\begin {align*} \int \frac {(e x)^{-1+n}}{a+b \csc \left (c+d x^n\right )} \, dx &=\frac {\left (x^{-n} (e x)^n\right ) \int \frac {x^{-1+n}}{a+b \csc \left (c+d x^n\right )} \, dx}{e}\\ &=\frac {\left (x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \frac {1}{a+b \csc (c+d x)} \, dx,x,x^n\right )}{e n}\\ &=\frac {(e x)^n}{a e n}-\frac {\left (x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \frac {1}{1+\frac {a \sin (c+d x)}{b}} \, dx,x,x^n\right )}{a e n}\\ &=\frac {(e x)^n}{a e n}-\frac {\left (2 x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \frac {1}{1+\frac {2 a x}{b}+x^2} \, dx,x,\tan \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{a d e n}\\ &=\frac {(e x)^n}{a e n}+\frac {\left (4 x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \frac {1}{-4 \left (1-\frac {a^2}{b^2}\right )-x^2} \, dx,x,\frac {2 a}{b}+2 \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{a d e n}\\ &=\frac {(e x)^n}{a e n}+\frac {2 b x^{-n} (e x)^n \tanh ^{-1}\left (\frac {b \left (\frac {a}{b}+\tan \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{\sqrt {a^2-b^2}}\right )}{a \sqrt {a^2-b^2} d e n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.25, size = 79, normalized size = 0.93 \[ \frac {(e x)^n \left (-\frac {2 b x^{-n} \tan ^{-1}\left (\frac {a+b \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {b^2-a^2}}\right )}{\sqrt {b^2-a^2}}+c x^{-n}+d\right )}{a d e n} \]

Antiderivative was successfully verified.

[In]

Integrate[(e*x)^(-1 + n)/(a + b*Csc[c + d*x^n]),x]

[Out]

((e*x)^n*(d + c/x^n - (2*b*ArcTan[(a + b*Tan[(c + d*x^n)/2])/Sqrt[-a^2 + b^2]])/(Sqrt[-a^2 + b^2]*x^n)))/(a*d*
e*n)

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 301, normalized size = 3.54 \[ \left [\frac {2 \, {\left (a^{2} - b^{2}\right )} d e^{n - 1} x^{n} + \sqrt {a^{2} - b^{2}} b e^{n - 1} \log \left (\frac {{\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x^{n} + c\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} a \cos \left (d x^{n} + c\right ) + a^{2} + b^{2} + 2 \, {\left (\sqrt {a^{2} - b^{2}} b \cos \left (d x^{n} + c\right ) + a b\right )} \sin \left (d x^{n} + c\right )}{a^{2} \cos \left (d x^{n} + c\right )^{2} - 2 \, a b \sin \left (d x^{n} + c\right ) - a^{2} - b^{2}}\right )}{2 \, {\left (a^{3} - a b^{2}\right )} d n}, \frac {{\left (a^{2} - b^{2}\right )} d e^{n - 1} x^{n} + \sqrt {-a^{2} + b^{2}} b e^{n - 1} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} b \sin \left (d x^{n} + c\right ) + \sqrt {-a^{2} + b^{2}} a}{{\left (a^{2} - b^{2}\right )} \cos \left (d x^{n} + c\right )}\right )}{{\left (a^{3} - a b^{2}\right )} d n}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)/(a+b*csc(c+d*x^n)),x, algorithm="fricas")

[Out]

[1/2*(2*(a^2 - b^2)*d*e^(n - 1)*x^n + sqrt(a^2 - b^2)*b*e^(n - 1)*log(((a^2 - 2*b^2)*cos(d*x^n + c)^2 + 2*sqrt
(a^2 - b^2)*a*cos(d*x^n + c) + a^2 + b^2 + 2*(sqrt(a^2 - b^2)*b*cos(d*x^n + c) + a*b)*sin(d*x^n + c))/(a^2*cos
(d*x^n + c)^2 - 2*a*b*sin(d*x^n + c) - a^2 - b^2)))/((a^3 - a*b^2)*d*n), ((a^2 - b^2)*d*e^(n - 1)*x^n + sqrt(-
a^2 + b^2)*b*e^(n - 1)*arctan(-(sqrt(-a^2 + b^2)*b*sin(d*x^n + c) + sqrt(-a^2 + b^2)*a)/((a^2 - b^2)*cos(d*x^n
 + c))))/((a^3 - a*b^2)*d*n)]

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (e x\right )^{n - 1}}{b \csc \left (d x^{n} + c\right ) + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)/(a+b*csc(c+d*x^n)),x, algorithm="giac")

[Out]

integrate((e*x)^(n - 1)/(b*csc(d*x^n + c) + a), x)

________________________________________________________________________________________

maple [C]  time = 2.66, size = 315, normalized size = 3.71 \[ \frac {x \,{\mathrm e}^{\frac {\left (-1+n \right ) \left (-i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )+i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}-i \pi \mathrm {csgn}\left (i e x \right )^{3}+2 \ln \relax (x )+2 \ln \relax (e )\right )}{2}}}{a n}-\frac {2 i \arctan \left (\frac {2 i a \,{\mathrm e}^{i \left (d \,x^{n}+2 c \right )}-2 \,{\mathrm e}^{i c} b}{2 \sqrt {a^{2} {\mathrm e}^{2 i c}-{\mathrm e}^{2 i c} b^{2}}}\right ) e^{n} b \,{\mathrm e}^{\frac {i \left (-\pi n \mathrm {csgn}\left (i e x \right )^{3}+\pi n \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}+\pi n \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}-\pi n \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )+\pi \mathrm {csgn}\left (i e x \right )^{3}-\pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}-\pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}+\pi \,\mathrm {csgn}\left (i e x \right ) \mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right )+2 c \right )}{2}}}{\sqrt {a^{2} {\mathrm e}^{2 i c}-{\mathrm e}^{2 i c} b^{2}}\, d e n a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(-1+n)/(a+b*csc(c+d*x^n)),x)

[Out]

1/a/n*x*exp(1/2*(-1+n)*(-I*csgn(I*e*x)^3*Pi+I*csgn(I*e*x)^2*csgn(I*e)*Pi+I*csgn(I*e*x)^2*csgn(I*x)*Pi-I*csgn(I
*e*x)*csgn(I*e)*csgn(I*x)*Pi+2*ln(e)+2*ln(x)))-2*I*arctan(1/2*(2*I*a*exp(I*(d*x^n+2*c))-2*exp(I*c)*b)/(a^2*exp
(2*I*c)-exp(2*I*c)*b^2)^(1/2))/(a^2*exp(2*I*c)-exp(2*I*c)*b^2)^(1/2)/d/e*e^n/n/a*b*exp(1/2*I*(-Pi*n*csgn(I*e*x
)^3+Pi*n*csgn(I*e)*csgn(I*e*x)^2+Pi*n*csgn(I*x)*csgn(I*e*x)^2-Pi*n*csgn(I*e)*csgn(I*x)*csgn(I*e*x)+Pi*csgn(I*e
*x)^3-Pi*csgn(I*e)*csgn(I*e*x)^2-Pi*csgn(I*x)*csgn(I*e*x)^2+Pi*csgn(I*e*x)*csgn(I*e)*csgn(I*x)+2*c))

________________________________________________________________________________________

maxima [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)/(a+b*csc(c+d*x^n)),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

mupad [B]  time = 2.31, size = 229, normalized size = 2.69 \[ \frac {x\,{\left (e\,x\right )}^{n-1}}{a\,n}-\frac {b\,x\,\ln \left (b\,x\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\,{\left (e\,x\right )}^{n-1}\,2{}\mathrm {i}-\frac {2\,b\,x\,{\left (e\,x\right )}^{n-1}\,\left (a\,1{}\mathrm {i}+b\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\right )}{\sqrt {a+b}\,\sqrt {a-b}}\right )\,{\left (e\,x\right )}^{n-1}}{a\,d\,n\,x^n\,\sqrt {a+b}\,\sqrt {a-b}}+\frac {b\,x\,\ln \left (b\,x\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\,{\left (e\,x\right )}^{n-1}\,2{}\mathrm {i}+\frac {2\,b\,x\,{\left (e\,x\right )}^{n-1}\,\left (a\,1{}\mathrm {i}+b\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\right )}{\sqrt {a+b}\,\sqrt {a-b}}\right )\,{\left (e\,x\right )}^{n-1}}{a\,d\,n\,x^n\,\sqrt {a+b}\,\sqrt {a-b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(n - 1)/(a + b/sin(c + d*x^n)),x)

[Out]

(x*(e*x)^(n - 1))/(a*n) - (b*x*log(b*x*exp(c*1i)*exp(d*x^n*1i)*(e*x)^(n - 1)*2i - (2*b*x*(e*x)^(n - 1)*(a*1i +
 b*exp(c*1i)*exp(d*x^n*1i)))/((a + b)^(1/2)*(a - b)^(1/2)))*(e*x)^(n - 1))/(a*d*n*x^n*(a + b)^(1/2)*(a - b)^(1
/2)) + (b*x*log(b*x*exp(c*1i)*exp(d*x^n*1i)*(e*x)^(n - 1)*2i + (2*b*x*(e*x)^(n - 1)*(a*1i + b*exp(c*1i)*exp(d*
x^n*1i)))/((a + b)^(1/2)*(a - b)^(1/2)))*(e*x)^(n - 1))/(a*d*n*x^n*(a + b)^(1/2)*(a - b)^(1/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (e x\right )^{n - 1}}{a + b \csc {\left (c + d x^{n} \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**(-1+n)/(a+b*csc(c+d*x**n)),x)

[Out]

Integral((e*x)**(n - 1)/(a + b*csc(c + d*x**n)), x)

________________________________________________________________________________________